package org.sbear.service.impl;

import org.apache.dubbo.config.annotation.Service;
import org.sbear.interfaces.MyDubboInterface;

import java.util.Random;

/**
 * 我达博impl
 *
 * @author xxyWi
 * @date 2021/01/27
 */
@Service
public class MyDubboImpl implements MyDubboInterface {

    @Override
    public String methodA(String param) throws InterruptedException {
        Random random = new Random();
        int i = random.nextInt(100);
        Thread.sleep(i);
        return "我是methodA,我的参数是:" + param;
    }

    @Override
    public String methodB(String param) throws InterruptedException {
        Random random = new Random();
        int i = random.nextInt(100);
        Thread.sleep(i);
        return "我是methodB,我的参数是:" + param;
    }

    @Override
    public String methodC(String param) throws InterruptedException {
        Random random = new Random();
        int i = random.nextInt(100);
        Thread.sleep(i);
        return "我是methodC,我的参数是:" + param;
    }
}
